home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime vr / vrspeech / vrspeech.h < prev   
Encoding:
Text File  |  2000-09-28  |  2.0 KB  |  64 lines

  1. //////////
  2. //
  3. //    File:        VRSpeech.h
  4. //
  5. //    Contains:    Speech recognition support for QuickTime VR movies.
  6. //
  7. //    Written by:    Tim Monroe
  8. //
  9. //    Copyright:    © 1996 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //    Change History (most recent first):
  12. //
  13. //       <1>         12/05/96    rtm        ported earlier speech recognition support functions to VRShell
  14. //       
  15. //////////
  16.  
  17. // header files
  18.  
  19. #include <SpeechRecognition.h>
  20. #include <AppleEvents.h>
  21. #include <Timer.h>
  22. #include <QuickTimeVR.h>
  23. #include "QTUtilities.h"
  24.  
  25. // miscellaneous constants
  26.  
  27. #define FloatToFixed(a)             ((Fixed)((float)(a) * fixed1))
  28. #define VRPi                         (3.1415926535898)
  29. #define VRDegreesToRadians(a)         ((a) * VRPi / 180.0)
  30. #define VRRadiansToDegrees(a)         ((a) * 180.0 / VRPi)
  31.  
  32. #define kLMResourceType                'LMDL'
  33. #define kLMResourceID                129
  34.  
  35. #define kSpinMillisecsDelay            25                //empirically determined
  36.  
  37. // an expanded Time Manager record
  38. // we use this to manage the spinning around
  39. typedef struct MyTMTask {
  40.     TMTask            theTMTask;
  41.     long            theSpinDir;
  42.     long            theSpinAmt;
  43.     long            theSpinDelay;
  44.     QTVRInstance    theInstance;
  45. } MyTMTask, *MyTMTaskPtr;
  46.  
  47.  
  48. // function prototypes
  49. void                VRSpeech_Init (void);
  50. void                VRSpeech_Stop (void);
  51. PASCAL_RTN OSErr    VRSpeech_HandleSpeechBegunAppleEvent (AppleEvent *theAEevt, AppleEvent* reply, long refcon);
  52. PASCAL_RTN OSErr    VRSpeech_HandleSpeechDoneAppleEvent (AppleEvent *theAEevt, AppleEvent* reply, long refcon);
  53. OSErr                VRSpeech_ReadLanguageModelsFromResource (void);
  54. Boolean                VRSpeech_GoDirByDegrees (QTVRInstance theInstance, long theDir, long theAmt);
  55. Boolean                VRSpeech_GoDirByRadians (QTVRInstance theInstance, long theDir, long theAmt);
  56. void                VRSpeech_ZoomInOrOut(QTVRInstance theInstance, long theDir);
  57. void                VRSpeech_DoEventLoopSpinCheck (void);
  58. Boolean                VRSpeech_IsSpinning (void);
  59. void                VRSpeech_StartSpinning (QTVRInstance theInstance, long theDir);
  60. void                VRSpeech_StopSpinning (void);
  61. PASCAL_RTN OSErr    VRSpeech_SpeakNameOfNode (QTVRInstance theInstance, long nodeID, SInt32 refCon);
  62. void                VRSpeech_InstallSpeechFeedbackRoutine (QTVRInstance theInstance);
  63.  
  64.